function EditMail(container, item, callbackFunc, options) {
  this._container = container;
  this._item = item;
  this._callbackFunc = callbackFunc;

  this._now = (options && options.now) ? options.now : null;
  
  this._createElements();
}

EditMail.prototype._createElements = function() {
  var _self = this;
  var unique = new Date().getTime();
  
  new EditMailGui(unique, this._container, this._item, null);
  
  this._gui = { sentBtn:  document.getElementById('img' + unique + '1') };
  
  this._gui.sentBtn.onclick = function() { for (var i = 0, il = _self._item.produces.length; i < il; i++) {
                                             var produce = _self._item.produces[i];
                                             if (produce.product.model == '{{$smarty.const.MODEL_NAME_PRODUCT_4X6|escape:javascript}}') {
                                               produce.status.state = 12;
                                             } else if (produce.product.model == '{{$smarty.const.MODEL_NAME_PRODUCT_COMMON|escape:javascript}}') {
                                               produce.status.state = 16;
                                             }
                                           }
                                           _self._item.rdate = _self._now;
                                           new RequestUtils()._write('mail', [_self._item], [], function() { _self._callbackFunc(); }, null);
                                         }
};